package com.lagou.bean;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

@Component
public class ConsumerComponent {

    @Reference(timeout = 1000)
    private HelloService helloService;

    public String callABC(char c1, String name) {
        if ('A' == c1) {
            return helloService.sayHello(name);
        } else if ('B' == c1) {
            return helloService.sayHello2(name);
        } else {
            return helloService.sayHello3(name);
        }

    }

}
